﻿using System;


namespace ExcelAutomator.ParameterPattern
{
	[ParameterPatternResolver(PatternIdDefinition)]
	internal class DateResolver : IParameterPatternResolver
	{
		public const string PatternIdDefinition = "%date";

		public string PatternId
		{
			get { return PatternIdDefinition; }
		}

		public string Resolve(string value, string propertyName, ExecutionContext context)
		{
			return DateTime.Today.ToString("yyyyMMdd");
		}
	}
}
